-- GENERATED SPELL FOR [Anchorite Caalen] --


function spell0_22862(pUnit, Event) --@Greater Heal,Heal--
pUnit:FullCastSpellOnTarget(35096,pUnit)
pUnit:RegisterEvent('Sorts_22862', 3500, 1)
end

function spell1_22862(pUnit, Event) --@Holy Fire,n/a--
pUnit:FullCastSpellOnTarget(17142,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22862', 13000, 1)
end

function spell2_22862(pUnit, Event) --@Holy Smite,n/a--
pUnit:FullCastSpellOnTarget(36176,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22862', 2500, 1)
end

function Sorts_22862(pUnit, Event)
local choix_sorts_22862 = math.random(0, 2)
if choix_sorts_22862 == 0 then
pUnit:RegisterEvent('spell0_22862', 1, 1)
end
if choix_sorts_22862 == 1 then
pUnit:RegisterEvent('spell1_22862', 1, 1)
end
if choix_sorts_22862 == 2 then
pUnit:RegisterEvent('spell2_22862', 1, 1)
end
end

function mob22862_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22862', math.random(1500, 3000), 1)
end

function mob22862_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22862_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22862_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22862, 1, 'mob22862_Action')
RegisterUnitEvent(22862, 2, 'mob22862_Leave')
RegisterUnitEvent(22862, 3, 'mob22862_Kill')
RegisterUnitEvent(22862, 4, 'mob22862_Die')
